<script type="text/javascript">
    function search(f) {
            if (f.getElementsByTagName('select')[0].selectedIndex > 0 && !document.getElementById('keyword').value) {
                    alert('검색어를 입력하세요');
                    return false;
            }
            return true;
    }
</script>
<form action="members.php" method="get" onsubmit="return search(this);">
<table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/sub_bg.gif">
                  <tr>
                    <td><table width="823" border="0" cellpadding="0" cellspacing="0">
                        <tr>
                          <td background="images/sub_bg_title.gif"><img src="images/sub_title_menu01.gif" width="208" height="70" border="0" /></td>
                        </tr>
                    </table></td>

                  </tr>
                  <tr>
                    <td height="30" valign="top">&nbsp;</td>
                  </tr>
                  <tr>
                    <td><table width="823" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                          <td valign="top"><table width="98%" border="0" cellpadding="3" cellspacing="0" class="font">
                              <tr>

                                <td width="30"><img src="images/1blank.gif" width="1" height="1" /></td>
                                <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                      <td><div align="left"></div>
                                          <table border="0" cellpadding="0" cellspacing="0" class="font">
                                            <tr>
                                              <td><img src="images/sub_company_01_01_line.gif" width="543" height="1" /></td>
                                            </tr>
                                            <tr>

                                              <td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="font">
                                                  <tr>
                                                    <td width="40" height="30"><img src="images/sub_company_01_01_img01.gif" alt="" width="11" height="8" /></td>
                                                    <td><label for="division_student">학생
                                                        <input name="division" type="radio" id="division_student" value="student" {_studentDivisionChecked} />
                                                        </label>
                                                      / <label for="division_teacher">선생님
                                                      <input type="radio" name="division" id="division_teacher" value="teacher" {_teacherDivisionChecked} /><label></td>
                                                  </tr>

                                              </table></td>
                                            </tr>
                                            <tr>
                                              <td><img src="images/sub_company_01_01_line.gif" width="543" height="1" /></td>
                                            </tr>
                                            <tr>
                                              <td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="font">
                                                  <tr>
                                                    <td width="40" height="30"><p><img src="images/sub_company_01_01_img02.gif" alt="" width="11" height="8" /></p></td>

                                                    <td><label></label>
                                                        <label>
                                                        <select name="condition" class="font" id="select">
                                                          <option  value="none"{_selectedSelected}>검색조건 없음</option>
                                                          <option value="name" {_nameSelected}>이름</option>
                                                          <option value="birth" {_birthSelected}>생년월일</option>
                                                          <option value="telNum" {_telNumSelected}>연락처</option>

                                                        </select>
                                                        <input name="keyword" type="text" class="font" id="keyword" size="30" maxlength="30" value="{_GET.keyword}" />
                                                        <input name="button" type="submit" class="font" id="button" value="검색" />
                                                      </label></td>
                                                  </tr>
                                              </table></td>
                                            </tr>
                                            <tr>
                                              <td><img src="images/sub_company_01_01_line.gif" width="543" height="1" /></td>

                                            </tr>
                                          </table>
                                        <div align="center"></div></td>
                                    </tr>
                                    <tr>
                                      <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                          <tr>
                                            <td width="50"></td>
                                            <td height="30">&nbsp;</td>

                                          </tr>
                                          <tr>
                                            <td height="15"></td>
                                            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                  <td width="15"></td>
                                                  <td><table width="780" border="2" cellspacing="0" cellpadding="3" bordercolor="#CCCCCC" class="font" style="border-collapse:collapse;">
                                                      <tr>
                                                        <td><div align="center">순번</div></td>

                                                        <td><div align="center">이름</div></td>
                                                        <td><div align="center">성별</div></td>
                              <!--  {? _GET.division == 'student' } -->
                                                        <td><div align="center">부모님 이름</div></td>
                                                      <!-- {/} -->
                                                        <td><div align="center">연락처</div></td>
                                                        <td><div align="center">아이디</div></td>
                                                      </tr>
            <!-- {@ _datas} -->
            <tr class="rows">
                <td><?php echo {_totalCount}--?></td>
<!-- {? _GET.division == 'student'} --> 
                <td><a href="membersDetail.php?id={.mb_id}">{.mb_name}</a></td>
 <!-- {:} -->
                <td><a href="teacher.php?modify=&mb_no={.mb_no}">{.mb_name}</a></td>
 <!-- {/} --> 
                <td>{? .mb_sex == 'M'}남{:} 여{/} </td>
                        <!-- {? _GET.division =='student'} -->
                        <td>{.mb_mom_name}</td>
                        <!-- {/} -->
                <td>{.mb_tel}</td>
                <td>{.mb_id}</td>
            </tr>
            <!-- {:}-->
                                          <tr>
<!-- {? _GET.division == 'student'} 6-->
                                            <td colspan="6"><div align="center">검색된 데이터가 없습니다</div></td>
                                            <!-- {:} -->
                                            <td colspan="5"><div align="center">검색된 데이터가 없습니다</div></td>
                                          </tr>
            <!-- {/} -->
            <!-- {/} -->
                                                  </table></td>
                                                </tr>
                                                <tr>
                                                  <td></td>
                                                  <td height="40">
                                                   <div align="center">
                                                   {_links}
                                                  </div></td>

                                                </tr>
                                                <tr>
                                                  <td></td>
                                                  <td class="font">* '학생 이름'을 클릭하면 자세히 보실 수 있습니다.</td>
                                                </tr>
                                            </table></td>
                                          </tr>
                                          <tr>

                                            <td></td>
                                            <td>&nbsp;</td>
                                          </tr>
                                      </table></td>
                                    </tr>
                                </table></td>
                              </tr>
                          </table></td>
                        </tr>

                    </table></td>
                  </tr>
                </table>
</form>
